import Vue from "vue";
import App from "./App.vue";
import VueRouter from "vue-router";
// 该模块设置可供systemdemo.js中showTaskPane()方法使用的vue组件，设置后，即可在任何地方调用该方法显示组件面板
Vue.use(VueRouter);
Vue.config.productionTip = false;

const routerCfg = [
    {
        path: "/", // 路由路径，加载默认页面，
        name: "默认页",
        component: () => import("./components/Root.vue"),
    },
    {
        path: "/dialog",
        name: "对话框",
        component: () => import("./components/Dialog.vue"),
    },
    {
        path: "/progress",
        name: "进度显示",
        component: () => import("./components/ProgressBar.vue"),
    },
    {
        path: "/demotaskpane",
        name: "任务窗格",
        component: () => import("./components/TaskPane.vue"),
    },
    {
        path: "/settings",
        component: () => import("./components/Settings.vue"),
    },
    {
        path: "/testPointInfo/:info", //路由连接中不建议使用下划线，通过:paras传参数
        component: () => import("./components/TestPointInfo.vue"),
        // component: () => import("./components/TotalInfo.vue"),
    },
    {
        path: "/correctCurve/:curve", //路由连接中不建议使用下划线，通过:paras传参数
        component: () => import("./components/CorrectCurveSettings.vue"),
        // component: () => import("./components/TotalInfo.vue"),
    },
];

new Vue({
    render: (h) => h(App),
    router: new VueRouter({routes: routerCfg}),
    created: function () {
        //
    },
}).$mount("#app");
